using UnityEngine;

public class CameraSizeController : MonoBehaviour
{
	public float defaultSize;

	public float thinSize;

	public float thickSize;

	private float defaultAspect = 0.5625f;

	private float thinAspect = 27f / 56f;

	private float thickAspect = 0.75f;

	private void Awake()
	{
		float num = (float)Screen.width / (float)Screen.height;
		if (num >= defaultAspect)
		{
			float num2 = num - defaultAspect;
			float num3 = num2 / (thickAspect - defaultAspect);
			float orthographicSize = defaultSize + (thickSize - defaultSize) * num3;
			Camera.main.orthographicSize = orthographicSize;
		}
		else if (num < defaultAspect)
		{
			float num4 = num - defaultAspect;
			float num5 = num4 / (thinAspect - defaultAspect);
			float orthographicSize2 = defaultSize + (thinSize - defaultSize) * num5;
			Camera.main.orthographicSize = orthographicSize2;
		}
	}
}
